/**
 * @className HomeController
 * @author liuxuelin
 * @Date 2021/2/24
 * @version v1.0
 */

package com.hidt.shop.controller;

import com.hidt.shop.domain.Order_table;
import com.hidt.shop.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
public class HomeController {
    @Autowired
    private HomeService homeService;
    /**
     *@方法功能描述：查找当日订单总数
     *@methodName findDayOrderCount
     *@params [order_table]
     *@return int
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findOrderCount")
    public int findDayOrderCount(){
        int orderCount = homeService.findOrderCount();
        return orderCount;
    }
    /**
     *@方法功能描述：查找当日的订单总额
     *@methodName findTodayOrderAllPrice
     *@params []
     *@return java.lang.String
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findTodayOrderPrice")
    public String findTodayOrderAllPrice(){
        String todayOrderAllPrice = homeService.findTodayOrderAllPrice();
        return todayOrderAllPrice;
    }
    /**
     *@方法功能描述：所有订单总额
     *@methodName findAllOrderAllPrice
     *@params []
     *@return java.lang.String
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findAllOrderPrice")
    public String findAllOrderAllPrice(){
        String OrderAllPrice = homeService.findAllOrderPrice();
        return OrderAllPrice;
    }
    /**
     *@方法功能描述：待支付订单
     *@methodName findPay1
     *@params []
     *@return int
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findPay1")
    public int findPay1(){
        int pay1 = homeService.findPay1();
        return pay1;
    }

    /**
     *@方法功能描述：待发货订单
     *@methodName findPay2
     *@params []
     *@return int
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findPay2")
    public int findPay2(){
        int pay2 = homeService.findPay2();
        return pay2;
    }
    /**
     *@方法功能描述：已发货订单
     *@methodName findPay3
     *@params []
     *@return int
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findPay3")
    public int findPay3(){
        int pay3 = homeService.findPay3();
        return pay3;
    }
    /**
     *@方法功能描述：已完成订单
     *@methodName findPay4
     *@params []
     *@return int
     *@author 刘雪林
     *@Date 2021/2/24
     */
    @RequestMapping("/findPay4")
    public int findPay4(){
        int pay4 = homeService.findPay4();
        return pay4;
    }
}
